<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>炫生活服务平台历史交易数据查询</title>
    <link rel="shortcut icon" href="../../static/common/img/favicon.ico"/>
    <style>
        .fl{float:left;}
        .fr{float:right;}
        .clear{clear:both;}
        ul{padding:0;}
        li{list-style:none}
        a{text-decoration : none}

        /*修改bootstrap表格边框颜色*/
        .table-bordered th,
        .table-bordered td {
            border: 1px solid #bbb !important;
            text-align:center;
            font-size:16px;
        }
    </style>
    <link type="text/css" rel="stylesheet" href="../../static/common/jedate-6.5.0/skin/jedate.css">
    <script type="text/javascript" src="../../static/common/jedate-6.5.0/src/jedate.js"></script>
    <link rel="stylesheet" href="../../static/common/css/bootstrap.min.css">
    <!--<link rel="stylesheet" href="../../static/common/css/bootstrap-datepicker.css">-->
    <link rel="stylesheet" href="../../static/index/css/menu.css">
</head>
<body>
    <ul id="navul" class="cl" style="top:30px;left:20px;">
        <li style="background: #006d96;">
            <a href="#">导航栏</a>
            <ul>
                <li><a href="{:url('index/index/full_data_overview')}">数据概览</a></li>
                <li><a href="{:url('index/index/full_real_time')}">实时数据</a></li>
                {if condition="$_SESSION['think']['user']['username'] eq 'xuanlife1'"}
                <li><a href="{:url('index/index/full_member_data')}">会员管理</a></li>
                <li><a href="{:url('index/index/full_transaction_data')}">交易数据</a></li>
                {/if}
            </ul>
        </li>
    </ul>
    <section class="content-header">
        <h1 style="text-align:center;">
            炫生活服务平台历史交易数据查询
        </h1>
        <div style="margin: 10px 20px;float: right;">
            <input id="date" name="date" type="text" placeholder="请选择日期"
                   style="height:30px;width:100px;text-align:center;vertical-align:top;" readonly>
            <input class="submit" type="submit" style="height:30px;width:50px;background:#169BD5;color:#fff;border:0;border-radius: 6px;text-align:center;" value="搜索">

        </div>
    </section>
    <section class="content container-fluid">
        <table class="table table-hover table-bordered">
            <tr>
                <td class="col-md-3">会员用户</td>
                <td class="col-md-3">订单商家</td>
                <td class="col-md-2">订单金额</td>
                <td class="col-md-2">下单时间</td>
                <td class="col-md-2">付款时间</td>
            </tr>
            {volist name='res' id='val'}
            <tr>
                <td>{$val['user']}</td>
                <td>
                    <?php
                        echo '****'.str_replace(mb_substr($val['store_name'],0,2,'utf-8'),'',$val['store_name']);
                    ?>
                </td>
                <td>{$val['order_price']}</td>
                <td>{$val['order_time']}</td>
                <td>{$val['pay_time']}</td>
            </tr>
            {/volist}
        </table>
        <div>
            <span style="float:left;margin-top:20px;font-size: 16px;">
                本月总计交易笔数：{$count} 笔&nbsp;&nbsp;&nbsp;&nbsp;本月总计交易金额：{$this_month_order_price} 元
                <div style="color: blue;">
                    累计交易笔数：{$all_order_num} 笔&nbsp;&nbsp;&nbsp;&nbsp;累计交易金额：{$all_order_price} 元
                </div>
            </span>
            <span style="float:right;">
                {$page}
            </span>
        </div>
    </section>
</body>
<script src="../../static/common/js/jquery.min.js"></script>
<!--菜单js-->
<script type="text/javascript" src="../../static/index/js-full/menu.js"></script>
<!--<script src="../../static/common/js/bootstrap-datepicker.js"></script>-->
<!--<script src="../../static/common/js/bootstrap-datepicker.zh-CN.js"></script>-->
<script type="text/javascript">
    $(document).ready(function (e) {
        //写入方法
        $("#date").val("<?php echo $date;?>");
    });

    $(function () {
        jeDate("#date", {
            format: "YYYY-MM",
            isTime: false,
            isClear: false,
            minDate: "2016-01",
            maxDate: "2018-08"
        })
    });

    $('.submit').click(function () {
        var date = $('input[name=date]').val();
        window.location.href = "{:url('index/index/full_transaction_data')}?date=" + date;
    });
    // $('.form_datetime').datepicker({
    //     format: 'yyyy-mm',
    //     autoclose: true,
    //     todayBtn: true,
    //     startView: 'year',
    //     minView:'year',
    //     maxView:'decade',
    //     language:  'zh-CN',
    // });
</script>
</html>

